﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace NuGet.MSBuild.Tools.Helpers
{
    internal class FileNameBuilder
    {
        public string DirectoryName { get; set; }
        public string Name { get; set; }
        public string Extension { get; set; }

        public string ToString()
        {
            string ext = null;
            if (this.Extension.StartsWith("."))
            {
                ext = this.Extension;
            }
            else
            {
                ext = "." + this.Extension;
            }

            return Path.Combine(this.DirectoryName, string.Format("{0}{1}", this.Name, ext));
        }
    }
}